//
//  UITableView+BCScreenshot.h
//  BCUIKit
//
//  Created by chun.chen on 2020/10/19.
//  截图

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UITableView (BCScreenshot)

/// 截图
- (UIImage *)bc_tableScreenshot;

/// 截图指定indexpatg图片
/// @param indexPath indexPath description
- (UIImage *)bc_screenshotOfCellAtIndexPath:(NSIndexPath *)indexPath;

/// 截取对应section Header 图片
/// @param section section description
- (UIImage *)bc_screenshotOfHeaderViewAtSection:(NSUInteger)section;

/// 截取对应section Footer 图片
/// @param section section description
- (UIImage *)bc_screenshotOfFooterViewAtSection:(NSUInteger)section;

/// 截图
/// @param withoutHeaders 是否去除所有的headers
/// @param withoutFooters 是否去除所有的ooters
/// @param withoutRows 是否去除所有的rows
- (UIImage *)bc_screenshotExcludingAllHeaders:(BOOL)withoutHeaders
                       excludingAllFooters:(BOOL)withoutFooters
                          excludingAllRows:(BOOL)withoutRows;

/// 截图
/// @param headerSections 不包含的header
/// @param footerSections 不包含的footer
/// @param indexPaths 不包含的indexPaths
- (UIImage *)bc_screenshotExcludingHeadersAtSections:(nullable NSSet *)headerSections
                       excludingFootersAtSections:(nullable NSSet *)footerSections
                        excludingRowsAtIndexPaths:(nullable NSSet *)indexPaths;

/// 截图
/// @param headerSections 包含的 header
/// @param footerSections 包含的footer
/// @param indexPaths 包含的indexPaths
- (UIImage *)bc_screenshotOfHeadersAtSections:(nullable NSSet *)headerSections
                         footersAtSections:(nullable NSSet *)footerSections
                          rowsAtIndexPaths:(nullable NSSet *)indexPaths;

@end

NS_ASSUME_NONNULL_END
